#!/bin/bash

host=192.168.13.17
user=online

dist_dir=/root/kes-online-demo/dist
target_dir=/home/online/fanyi/apache-tomcat-9.0.97/webapps/online-demo

ssh ${user}@${host} "rm -rf ${target_dir}/js"
ssh ${user}@${host} "rm -rf ${target_dir}/css"
ssh ${user}@${host} "rm -rf ${target_dir}/fonts"
ssh ${user}@${host} "rm -rf ${target_dir}/img"
ssh ${user}@${host} "rm -f ${target_dir}/index.html"
ssh ${user}@${host} "rm -f ${target_dir}/favicon.ico"

scp -r ${dist_dir}/js/ ${user}@${host}:${target_dir}/js/
scp -r ${dist_dir}/css/ ${user}@${host}:${target_dir}/css/
scp -r ${dist_dir}/fonts/ ${user}@${host}:${target_dir}/fonts/
scp -r ${dist_dir}/img/ ${user}@${host}:${target_dir}/img/
scp ${dist_dir}/index.html ${user}@${host}:${target_dir}/
scp ${dist_dir}/favicon.ico ${user}@${host}:${target_dir}/

